/**
 * @file STM32F4xxI176_IO_V4.h
 * @author lq (lq@hacint.com.cn)
 * @brief 
 * @version 0.1
 * @date 2024-11-05
 * 
 * 
 */

#ifndef _STM32F4xxI176_IO_V4_H
#define _STM32F4xxI176_IO_V4_H 



 /*********************************W5500-SPI5 control*/ 
  /*
W5500_MOSI			PF9
W5500_MISO			PF8
W5500_CLK 			PF7  
*/
/*port define*/
#define W5500_MOSI_PORT		GPIOF
#define W5500_MISO_PORT		GPIOF
#define SW5500_CLK_PORT			GPIOF
#define W5500_MOSI_PIN			GPIO_PIN_9
#define W5500_MISO_PIN			GPIO_PIN_8
#define W5500_CLK_PIN			GPIO_PIN_7
#define W5500_MOSI_RCC_ENABLE()	__HAL_RCC_GPIOF_CLK_ENABLE() 
#define W5500_MISO_RCC_ENABLE()	__HAL_RCC_GPIOF_CLK_ENABLE() 
#define W5500_CLK_RCC_ENABLE()		__HAL_RCC_GPIOF_CLK_ENABLE() 
/*port define*/
#define	W5500_MOSI_BitNum	9 
#define	W5500_MISO_BitNum	8
#define	W5500_CLK_BitNum		7 
#define	W5500_MOSI_ADDR		GPIOF_ODR_Addr 
#define	W5500_MISO_ADDR		GPIOF_ODR_Addr
#define	W5500_CLK_ADDR			GPIOF_ODR_Addr
 
  
 
 /*********************************W5500 control*/ 
 /*
W5500_RST			PI11
W5500_INT			PF6
W5500_CS 			PC1  
*/
/*port define*/
#define W5500_RST_PORT		GPIOI
#define W5500_INT_PORT		GPIOF
#define W5500_CS_PORT			GPIOC
#define W5500_RST_PIN			GPIO_PIN_11
#define W5500_INT_PIN			GPIO_PIN_6
#define W5500_CS_PIN			GPIO_PIN_1
#define W5500_RST_RCC_ENABLE()	__HAL_RCC_GPIOI_CLK_ENABLE() 
#define W5500_INT_RCC_ENABLE()	__HAL_RCC_GPIOF_CLK_ENABLE() 
#define W5500_CS_RCC_ENABLE()		__HAL_RCC_GPIOC_CLK_ENABLE() 
/*port define*/
#define	W5500_RST_BitNum	11 
#define	W5500_INT_BitNum	6 
#define	W5500_CS_BitNum		1  
#define	W5500_RST_ADDR		GPIOI_ODR_Addr 
#define	W5500_INT_ADDR		GPIOF_ODR_Addr
#define	W5500_CS_ADDR			GPIOC_ODR_Addr

 /*********************************P12V1 p12V供电继电器的控制  PA0*/ 
/*port define
P12V控制  PA0
*/
#define P12V1_POWERON_PORT		GPIOA
#define P12V1_POWERON_PIN		GPIO_PIN_0
#define P12V1_POWERON_RCC_ENABLE()	__HAL_RCC_GPIOA_CLK_ENABLE() 
/*bitband define*/
#define	P12V1_POWERON_BitNum	0 
#define	P12V1_POWERON_ADDR		GPIOA_ODR_Addr 

/********************************* 核心板 唤醒 PA0*/ 
/*port define*/
#define WKUP_PORT		GPIOA
#define WKUP_PIN		GPIO_PIN_0
#define WKUP_RCC_ENABLE()	__HAL_RCC_GPIOA_CLK_ENABLE() 
/*bitband define*/
#define	WKUP_BitNum	0 
#define	WKUP_ADDR	GPIOA_IDR_Addr 
/********************************* 电流监控 PD2*/ 
/*port define*/
#define CUR_MONITOR_PORT		GPIOD
#define CUR_MONITOR_PIN			GPIO_PIN_2
#define CUR_MONITOR_RCC_ENABLE()	__HAL_RCC_GPIOD_CLK_ENABLE() 
/*bitband define*/
#define	CUR_MONITOR_BitNum	2 
#define	CUR_MONITOR_ADDR	GPIOD_IDR_Addr 
 /********************************* LED1   PB1*/ 
/*port define*/
#define LED1_PORT		GPIOB
#define LED1_PIN		GPIO_PIN_1
#define LED1_RCC_ENABLE()	__HAL_RCC_GPIOB_CLK_ENABLE() 
/*bitband define*/
#define	LED1_BitNum	1 
#define	LED1_ADDR	GPIOB_ODR_Addr 
 /********************************* 放电电压切换   PB0*/ 
/*port define  PB0*/
#define REF_V_CTRL_PORT		GPIOB
#define REF_V_CTRL_PIN		GPIO_PIN_0
#define REF_V_CTRL_RCC_ENABLE()	__HAL_RCC_GPIOB_CLK_ENABLE() 
/*bitband define*/
#define	REF_V_CTRL_BitNum	0 
#define	REF_V_CTRL_ADDR	GPIOB_ODR_Addr 
 /*********************************BUZZER PC13*/ 
/*port define*/
#define BUZZER_PORT		GPIOC 
#define BUZZER_PIN		GPIO_PIN_13 
#define BUZZER_RCC_ENABLE()	__HAL_RCC_GPIOC_CLK_ENABLE()   
/*bitband define*/
#define	BUZZER_BitNum		13
#define	BUZZER_ADDR		GPIOC_ODR_Addr 
 /*********************************探笔探点POINT  H3*/ 
/*port define*/
#define POINT_PORT			GPIOH 
#define POINT_PIN			GPIO_PIN_3 
#define POINT_RCC_ENABLE()	__HAL_RCC_GPIOH_CLK_ENABLE()   
/*bitband define*/
#define	POINT_BitNum		3 
#define	POINT_ADDR		GPIOH_ODR_Addr 
/*********************************QEN   */ 
/*灯点探点
QEN1		PC12 
*/
/*port define*/
#define QEN_PORT		GPIOC 
#define QEN_PIN			GPIO_PIN_12 
#define QEN_RCC_ENABLE()	__HAL_RCC_GPIOC_CLK_ENABLE()   
/*bitband define*/
#define	QEN_BitNum		12   
#define	QEN_ADDR		GPIOC_ODR_Addr    
/*********************************QEN1 QEN2  */ 
/*
QEN1		PC12
QEN2		PH2  
*/
/*port define*/
#define QEN1_PORT		GPIOC
#define QEN2_PORT		GPIOH
#define QEN1_PIN			GPIO_PIN_12
#define QEN2_PIN			GPIO_PIN_2  
#define QEN1_RCC_ENABLE()	__HAL_RCC_GPIOC_CLK_ENABLE()   
#define QEN2_RCC_ENABLE()	__HAL_RCC_GPIOH_CLK_ENABLE() 
/*bitband define*/
#define	QEN1_BitNum		12 
#define	QEN2_BitNum		2   
#define	QEN1_ADDR		GPIOC_ODR_Addr  
#define	QEN2_ADDR		GPIOH_ODR_Addr  
/*********************************输出锁存  */ 
/*
POUT0_EN		PG6		s0-s7终止端口控制信号	
POUT1_EN		PD6		输出IO低8
POUT2_EN		PD7		输出IO高8
*/
/*port define*/
#define POUT0_EN_PORT		GPIOG
#define POUT1_EN_PORT		GPIOD
#define POUT2_EN_PORT		GPIOD
#define POUT0_EN_PIN			GPIO_PIN_6
#define POUT1_EN_PIN			GPIO_PIN_6 
#define POUT2_EN_PIN			GPIO_PIN_7 
#define POUT0_EN_RCC_ENABLE()	__HAL_RCC_GPIOG_CLK_ENABLE()   
#define POUT1_EN_RCC_ENABLE()	__HAL_RCC_GPIOD_CLK_ENABLE()
#define POUT2_EN_RCC_ENABLE()	__HAL_RCC_GPIOD_CLK_ENABLE()
/*bitband define*/
#define	POUT0_EN_BitNum		6
#define	POUT1_EN_BitNum		6
#define	POUT2_EN_BitNum		7
#define	POUT0_EN_ADDR		GPIOG_ODR_Addr  
#define	POUT1_EN_ADDR		GPIOD_ODR_Addr 
#define	POUT2_EN_ADDR		GPIOD_ODR_Addr

/*********************************输入总线控制 ************ */ 
/*
PIN0_EN		PG14		8路比较采样信号
PIN1_EN		PD11		输入IO低8
PIN2_EN		PD12		输入IO高8
*/
/*port define*/
#define PIN0_EN_PORT		GPIOG
#define PIN1_EN_PORT		GPIOD
#define PIN2_EN_PORT		GPIOD
#define PIN0_EN_PIN			GPIO_PIN_14
#define PIN1_EN_PIN			GPIO_PIN_11 
#define PIN2_EN_PIN			GPIO_PIN_12 
#define PIN0_EN_RCC_ENABLE()	__HAL_RCC_GPIOG_CLK_ENABLE()   
#define PIN1_EN_RCC_ENABLE()	__HAL_RCC_GPIOD_CLK_ENABLE()
#define PIN2_EN_RCC_ENABLE()	__HAL_RCC_GPIOD_CLK_ENABLE()
/*bitband define*/
#define	PIN0_EN_BitNum		14
#define	PIN1_EN_BitNum		11
#define	PIN2_EN_BitNum		12
#define	PIN0_EN_ADDR		GPIOG_ODR_Addr  
#define	PIN1_EN_ADDR		GPIOD_ODR_Addr 
#define	PIN2_EN_ADDR		GPIOD_ODR_Addr




 /********************************RS485 */ 
/*port define*/
/*
RS485_EN	PA1 
RS485_RXD	PA3
RS485_TXD	PA2  
*/
#define RS485_EN_PORT			GPIOA
#define RS485_RXD_PORT		GPIOA
#define RS485_TXD_PORT		GPIOA
#define RS485_EN_PIN			GPIO_PIN_1 
#define RS485_RXD_PIN			GPIO_PIN_3 
#define RS485_TXD_PIN			GPIO_PIN_2  
#define RS485_EN_RCC_ENABLE()		__HAL_RCC_GPIOA_CLK_ENABLE()   
#define RS485_RXD_RCC_ENABLE()	__HAL_RCC_GPIOA_CLK_ENABLE()  
#define RS485_TXD_RCC_ENABLE()	__HAL_RCC_GPIOA_CLK_ENABLE()  
/*bitband define*/
#define	RS485_EN_BitNum		1 
#define	RS485_RXD_BitNum		3 
#define	RS485_TXD_BitNum		2  
#define	RS485_EN_ADDR			GPIOA_ODR_Addr 
#define	RS485_RXD_ADDR		GPIOA_ODR_Addr 
#define	RS485_TXD_ADDR		GPIOA_ODR_Addr 

/********************************8路数据输入 与数据采集复用*/ 
/*port define*/
/*
IN0_BUS	PI0
IN1_BUS	PI1
IN2_BUS	PI2
IN3_BUS	PI3
IN4_BUS	PI4
IN5_BUS	PI5
IN6_BUS	PI6
IN7_BUS	PI7 
*/  
#define IN0_BUS_PORT		GPIOI
#define IN1_BUS_PORT		GPIOI
#define IN2_BUS_PORT		GPIOI
#define IN3_BUS_PORT		GPIOI
#define IN4_BUS_PORT		GPIOI
#define IN5_BUS_PORT		GPIOI
#define IN6_BUS_PORT		GPIOI
#define IN7_BUS_PORT		GPIOI
#define IN0_BUS_PIN		GPIO_PIN_0
#define IN1_BUS_PIN		GPIO_PIN_1
#define IN2_BUS_PIN		GPIO_PIN_2
#define IN3_BUS_PIN		GPIO_PIN_3
#define IN4_BUS_PIN		GPIO_PIN_4
#define IN5_BUS_PIN		GPIO_PIN_5
#define IN6_BUS_PIN		GPIO_PIN_6
#define IN7_BUS_PIN		GPIO_PIN_7
#define IN0_BUS_RCC_ENABLE()	__HAL_RCC_GPIOI_CLK_ENABLE()  
#define IN1_BUS_RCC_ENABLE()	__HAL_RCC_GPIOI_CLK_ENABLE() 
#define IN2_BUS_RCC_ENABLE()	__HAL_RCC_GPIOI_CLK_ENABLE() 
#define IN3_BUS_RCC_ENABLE()	__HAL_RCC_GPIOI_CLK_ENABLE() 
#define IN4_BUS_RCC_ENABLE()	__HAL_RCC_GPIOI_CLK_ENABLE()  
#define IN5_BUS_RCC_ENABLE()	__HAL_RCC_GPIOI_CLK_ENABLE() 
#define IN6_BUS_RCC_ENABLE()	__HAL_RCC_GPIOI_CLK_ENABLE() 
#define IN7_BUS_RCC_ENABLE()	__HAL_RCC_GPIOI_CLK_ENABLE() 
/*bitband define*/
#define	IN0_BUS__BitNum			0
#define	IN1_BUS__BitNum			1
#define	IN2_BUS__BitNum			2
#define	IN3_BUS__BitNum			3
#define	IN4_BUS__BitNum			4
#define	IN5_BUS__BitNum			5
#define	IN6_BUS__BitNum			6
#define	IN7_BUS__BitNum			7
#define	IN0_BUS__ADDR		GPIOI_IDR_Addr
#define	IN1_BUS__ADDR		GPIOI_IDR_Addr
#define	IN2_BUS__ADDR		GPIOI_IDR_Addr
#define	IN3_BUS__ADDR		GPIOI_IDR_Addr
#define	IN4_BUS__ADDR		GPIOI_IDR_Addr
#define	IN5_BUS__ADDR		GPIOI_IDR_Addr
#define	IN6_BUS__ADDR		GPIOI_IDR_Addr
#define	IN7_BUS__ADDR		GPIOI_IDR_Addr

/********************************8路数据输出,与终止端端选复用 */ 
/*port define*/
/*
	OUT0_BUS	PB8
	OUT1_BUS	PB9
	OUT2_BUS	PB10
	OUT3_BUS	PB11
	OUT4_BUS	PB12
	OUT5_BUS	PB13
	OUT6_BUS	PB14
	OUT7_BUS	PB15 
*/  
#define E_SOUT0_BUS_PORT		GPIOB
#define E_SOUT1_BUS_PORT		GPIOB
#define E_SOUT2_BUS_PORT		GPIOB
#define E_SOUT3_BUS_PORT		GPIOB
#define E_SOUT4_BUS_PORT		GPIOB
#define E_SOUT5_BUS_PORT		GPIOB
#define E_SOUT6_BUS_PORT		GPIOB
#define E_SOUT7_BUS_PORT		GPIOB
#define E_SOUT0_BUS_PIN		GPIO_PIN_8
#define E_SOUT1_BUS_PIN		GPIO_PIN_9
#define E_SOUT2_BUS_PIN		GPIO_PIN_10
#define E_SOUT3_BUS_PIN		GPIO_PIN_11
#define E_SOUT4_BUS_PIN		GPIO_PIN_12
#define E_SOUT5_BUS_PIN		GPIO_PIN_13
#define E_SOUT6_BUS_PIN		GPIO_PIN_14
#define E_SOUT7_BUS_PIN		GPIO_PIN_15
#define E_SOUT0_BUS_RCC_ENABLE()	__HAL_RCC_GPIOB_CLK_ENABLE()  
#define E_SOUT1_BUS_RCC_ENABLE()	__HAL_RCC_GPIOB_CLK_ENABLE() 
#define E_SOUT2_BUS_RCC_ENABLE()	__HAL_RCC_GPIOB_CLK_ENABLE() 
#define E_SOUT3_BUS_RCC_ENABLE()	__HAL_RCC_GPIOB_CLK_ENABLE() 
#define E_SOUT4_BUS_RCC_ENABLE()	__HAL_RCC_GPIOB_CLK_ENABLE()  
#define E_SOUT5_BUS_RCC_ENABLE()	__HAL_RCC_GPIOB_CLK_ENABLE() 
#define E_SOUT6_BUS_RCC_ENABLE()	__HAL_RCC_GPIOB_CLK_ENABLE() 
#define E_SOUT7_BUS_RCC_ENABLE()	__HAL_RCC_GPIOB_CLK_ENABLE() 
/*bitband define*/
#define	E_SOUT0_BUS_BitNum			8
#define	E_SOUT1_BUS_BitNum			9
#define	E_SOUT2_BUS_BitNum			10
#define	E_SOUT3_BUS_BitNum			11
#define	E_SOUT4_BUS_BitNum			12
#define	E_SOUT5_BUS_BitNum			13
#define	E_SOUT6_BUS_BitNum			14
#define	E_SOUT7_BUS_BitNum			15
#define	E_SOUT0_BUS_ADDR		GPIOB_ODR_Addr
#define	E_SOUT1_BUS_ADDR		GPIOB_ODR_Addr
#define	E_SOUT2_BUS_ADDR		GPIOB_ODR_Addr
#define	E_SOUT3_BUS_ADDR		GPIOB_ODR_Addr
#define	E_SOUT4_BUS_ADDR		GPIOB_ODR_Addr
#define	E_SOUT5_BUS_ADDR		GPIOB_ODR_Addr
#define	E_SOUT6_BUS_ADDR		GPIOB_ODR_Addr
#define	E_SOUT7_BUS_ADDR		GPIOB_ODR_Addr




 
 /***************************************************start 起始针******************************************/
/*Start 通道：4个引脚控制起始针选择16个的哪个通道*/
/*port define*/
/*
	MS_A0 PH4
	MS_A1	PH5
	MS_A2	PH6
	MS_A3	PH7
 
*/  
#define MS_A0_PORT			GPIOH
#define MS_A1_PORT			GPIOH
#define MS_A2_PORT			GPIOH
#define MS_A3_PORT			GPIOH 
#define MS_A0_PIN			GPIO_PIN_4
#define MS_A1_PIN			GPIO_PIN_5
#define MS_A2_PIN			GPIO_PIN_6
#define MS_A3_PIN			GPIO_PIN_7   
#define MS_A0_RCC_ENABLE()		__HAL_RCC_GPIOH_CLK_ENABLE() 
#define MS_A1_RCC_ENABLE()		__HAL_RCC_GPIOH_CLK_ENABLE() 
#define MS_A2_RCC_ENABLE()		__HAL_RCC_GPIOH_CLK_ENABLE() 
#define MS_A3_RCC_ENABLE()		__HAL_RCC_GPIOH_CLK_ENABLE() 
/*bitband define*/ 
#define	MS_A0_BitNum		4
#define	MS_A1_BitNum		5
#define	MS_A2_BitNum		6 
#define	MS_A3_BitNum		7  
#define	MS_A0_ADDR		GPIOH_ODR_Addr 
#define	MS_A1_ADDR		GPIOH_ODR_Addr 
#define	MS_A2_ADDR		GPIOH_ODR_Addr 
#define	MS_A3_ADDR		GPIOH_ODR_Addr 

/*Start 端口：3个引脚控制8选一芯片*/
/*port define*/
/*
	MS_A	PB4
	MS_B	PB5
	MS_C	PB6  
*/
#define MS_A_PORT			GPIOB
#define MS_B_PORT			GPIOB
#define MS_C_PORT			GPIOB 
#define MS_A_PIN			GPIO_PIN_4
#define MS_B_PIN			GPIO_PIN_5
#define MS_C_PIN			GPIO_PIN_6 
#define MS_A_RCC_ENABLE()		__HAL_RCC_GPIOB_CLK_ENABLE()  
#define MS_B_RCC_ENABLE()		__HAL_RCC_GPIOB_CLK_ENABLE() 
#define MS_C_RCC_ENABLE()		__HAL_RCC_GPIOB_CLK_ENABLE()    
/*bitband define*/
#define	MS_A_BitNum		4
#define	MS_B_BitNum		5
#define	MS_C_BitNum		6 
#define	MS_A_ADDR		GPIOB_ODR_Addr 
#define	MS_B_ADDR		GPIOB_ODR_Addr 
#define	MS_C_ADDR		GPIOB_ODR_Addr  

/*Start 板卡：8选一控制选择哪个子卡*/
/*port define*/
/*
	MS_A7	PA6
	MS_A8	PA7
	MS_A9	PA8 
*/ 
#define MS_A7_PORT			GPIOA
#define MS_A8_PORT			GPIOA
#define MS_A9_PORT			GPIOA  
#define MS_A7_PIN			GPIO_PIN_6
#define MS_A8_PIN			GPIO_PIN_7
#define MS_A9_PIN			GPIO_PIN_8   
#define MS_A7_RCC_ENABLE()		__HAL_RCC_GPIOA_CLK_ENABLE() 
#define MS_A8_RCC_ENABLE()		__HAL_RCC_GPIOA_CLK_ENABLE() 
#define MS_A9_RCC_ENABLE()		__HAL_RCC_GPIOA_CLK_ENABLE()  
/*bitband define*/ 
#define	MS_A7_BitNum		6
#define	MS_A8_BitNum		7
#define	MS_A9_BitNum		8   
#define	MS_A7_ADDR		GPIOA_ODR_Addr 
#define	MS_A8_ADDR		GPIOA_ODR_Addr 
#define	MS_A9_ADDR		GPIOA_ODR_Addr  

/*Start 机箱：16个机箱选择*/
/*port define*/
/*
	MS_A10	PC8
	MS_A11	PC9
	MS_A12	PC10
	MS_A13	PC11	
*/ 
#define MS_A10_PORT			GPIOC
#define MS_A11_PORT			GPIOC
#define MS_A12_PORT			GPIOC  
#define MS_A13_PORT			GPIOC  
#define MS_A10_PIN			GPIO_PIN_8
#define MS_A11_PIN			GPIO_PIN_9
#define MS_A12_PIN			GPIO_PIN_10 
#define MS_A13_PIN			GPIO_PIN_11
#define MS_A10_RCC_ENABLE()		__HAL_RCC_GPIOC_CLK_ENABLE() 
#define MS_A11_RCC_ENABLE()		__HAL_RCC_GPIOC_CLK_ENABLE() 
#define MS_A12_RCC_ENABLE()		__HAL_RCC_GPIOC_CLK_ENABLE() 
#define MS_A13_RCC_ENABLE()		__HAL_RCC_GPIOC_CLK_ENABLE() 
/*bitband define*/ 
#define	MS_A10_BitNum		8
#define	MS_A11_BitNum		9
#define	MS_A12_BitNum		10  
#define	MS_A13_BitNum		11 
#define	MS_A10_ADDR		GPIOC_ODR_Addr 
#define	MS_A11_ADDR		GPIOC_ODR_Addr 
#define	MS_A12_ADDR		GPIOC_ODR_Addr 
#define	MS_A13_ADDR		GPIOC_ODR_Addr 


/***************************************************END 终止针*****************************************/
/*END 16通道*/ 
/* define*/
/*
	ME_A0  PG10
	ME_A1	PG11
	ME_A2	PG12
	ME_A3	PG13
 
*/  
#define ME_A0_PORT			GPIOG
#define ME_A1_PORT			GPIOG
#define ME_A2_PORT			GPIOG
#define ME_A3_PORT			GPIOG 
#define ME_A0_PIN			GPIO_PIN_10
#define ME_A1_PIN			GPIO_PIN_11
#define ME_A2_PIN			GPIO_PIN_12
#define ME_A3_PIN			GPIO_PIN_13  
#define ME_A0_RCC_ENABLE()		__HAL_RCC_GPIOG_CLK_ENABLE() 
#define ME_A1_RCC_ENABLE()		__HAL_RCC_GPIOG_CLK_ENABLE() 
#define ME_A2_RCC_ENABLE()		__HAL_RCC_GPIOG_CLK_ENABLE() 
#define ME_A3_RCC_ENABLE()		__HAL_RCC_GPIOG_CLK_ENABLE() 
/*bitband define*/ 
#define	ME_A0_BitNum		10
#define	ME_A1_BitNum		11
#define	ME_A2_BitNum		12 
#define	ME_A3_BitNum		13  
#define	ME_A0_ADDR		GPIOG_ODR_Addr 
#define	ME_A1_ADDR		GPIOG_ODR_Addr 
#define	ME_A2_ADDR		GPIOG_ODR_Addr 
#define	ME_A3_ADDR		GPIOG_ODR_Addr 

/*END 端选   与八路输出复用*/ 
/*上边已经定义过了
	

	OUT0_BUS	PB8
	OUT1_BUS	PB9
	OUT2_BUS	PB10
	OUT3_BUS	PB11
	OUT4_BUS	PB12
	OUT5_BUS	PB13
	OUT6_BUS	PB14
	OUT7_BUS	PB15 
*/  




/*卡选 define*/
/*
	ME_EN0	PH8
	ME_EN1	PH9
	ME_EN2	PH10
	ME_EN3  PH11
	ME_EN4	PH12
	ME_EN5	PH13
	ME_EN6	PH14
	ME_EN7	PH15 
*/  
#define ME_EN0_PORT		GPIOH
#define ME_EN1_PORT		GPIOH
#define ME_EN2_PORT		GPIOH
#define ME_EN3_PORT		GPIOH
#define ME_EN4_PORT		GPIOH
#define ME_EN5_PORT		GPIOH
#define ME_EN6_PORT		GPIOH
#define ME_EN7_PORT		GPIOH
#define ME_EN0_PIN		GPIO_PIN_8
#define ME_EN1_PIN		GPIO_PIN_9
#define ME_EN2_PIN		GPIO_PIN_10
#define ME_EN3_PIN		GPIO_PIN_11
#define ME_EN4_PIN		GPIO_PIN_12
#define ME_EN5_PIN		GPIO_PIN_13
#define ME_EN6_PIN		GPIO_PIN_14
#define ME_EN7_PIN		GPIO_PIN_15
#define ME_EN0_RCC_ENABLE()	__HAL_RCC_GPIOH_CLK_ENABLE()  
#define ME_EN1_RCC_ENABLE()	__HAL_RCC_GPIOH_CLK_ENABLE() 
#define ME_EN2_RCC_ENABLE()	__HAL_RCC_GPIOH_CLK_ENABLE() 
#define ME_EN3_RCC_ENABLE()	__HAL_RCC_GPIOH_CLK_ENABLE() 
#define ME_EN4_RCC_ENABLE()	__HAL_RCC_GPIOH_CLK_ENABLE()  
#define ME_EN5_RCC_ENABLE()	__HAL_RCC_GPIOH_CLK_ENABLE() 
#define ME_EN6_RCC_ENABLE()	__HAL_RCC_GPIOH_CLK_ENABLE() 
#define ME_EN7_RCC_ENABLE()	__HAL_RCC_GPIOH_CLK_ENABLE() 
/*bitband define*/
#define	ME_EN0_BitNum			8
#define	ME_EN1_BitNum			9
#define	ME_EN2_BitNum			10
#define	ME_EN3_BitNum			11
#define	ME_EN4_BitNum			12
#define	ME_EN5_BitNum			13
#define	ME_EN6_BitNum			14
#define	ME_EN7_BitNum			15
#define	ME_EN0_ADDR		GPIOH_ODR_Addr
#define	ME_EN1_ADDR		GPIOH_ODR_Addr
#define	ME_EN2_ADDR		GPIOH_ODR_Addr
#define	ME_EN3_ADDR		GPIOH_ODR_Addr
#define	ME_EN4_ADDR		GPIOH_ODR_Addr
#define	ME_EN5_ADDR		GPIOH_ODR_Addr
#define	ME_EN6_ADDR		GPIOH_ODR_Addr
#define	ME_EN7_ADDR		GPIOH_ODR_Addr
					 

/*END 16机箱*/ 
/*port define*/
/*
	ME_A10 	PC4
	ME_A11	PC5
	ME_A12	PC6
	ME_A13	PC7
 
*/  
#define ME_A10_PORT			GPIOC
#define ME_A11_PORT			GPIOC
#define ME_A12_PORT			GPIOC
#define ME_A13_PORT			GPIOC 
#define ME_A10_PIN			GPIO_PIN_4
#define ME_A11_PIN			GPIO_PIN_5
#define ME_A12_PIN			GPIO_PIN_6
#define ME_A13_PIN			GPIO_PIN_7  
#define ME_A10_RCC_ENABLE()		__HAL_RCC_GPIOC_CLK_ENABLE() 
#define ME_A11_RCC_ENABLE()		__HAL_RCC_GPIOC_CLK_ENABLE() 
#define ME_A12_RCC_ENABLE()		__HAL_RCC_GPIOC_CLK_ENABLE() 
#define ME_A13_RCC_ENABLE()		__HAL_RCC_GPIOC_CLK_ENABLE() 
/*bitband define*/ 
#define	ME_A10_BitNum		4
#define	ME_A11_BitNum		5
#define	ME_A12_BitNum		6 
#define	ME_A13_BitNum		7  
#define	ME_A10_ADDR		GPIOC_ODR_Addr 
#define	ME_A11_ADDR		GPIOC_ODR_Addr 
#define	ME_A12_ADDR		GPIOC_ODR_Addr 
#define	ME_A13_ADDR		GPIOC_ODR_Addr 




 




//
 
#endif
